<template>
  <view class="set">
    <!--pages/my/set.wxml-->
    <view class="loading">
      <van-loading v-if="loading" size="24px" color="#1989fa" :vertical="true" type="spinner">提交中...</van-loading>
    </view>
    <van-notify id="van-notify" />
    <view class="message">
      <view class="title">入职单位信息</view>
      <view class="set-box2">
        <text class="set-tex1">*单位名称</text>
        <input type="text" class="set-inp" placeholder="暂无客户信息" name="name" :value="xydw" disabled />
      </view>
      <view class="set-box2">
        <text class="set-tex1">*客服名字</text>
        <input type="text" class="set-inp" placeholder="暂无客户信息" name="name" :value="kefu" disabled />
      </view>
      <view class="set-box2">
        <text class="set-tex1">*客服电话</text>
        <input type="text" class="set-inp" placeholder="暂无客户信息" name="name" :value="kftel" disabled />
      </view>
    </view>
    <form @submit="formSubmit" bindreset="formReset">
      <view class="set-box">
        <view class="title">个人填写信息</view>
        <view class="set-box2">
          <text class="set-tex1">姓名</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入您的姓名"
            name="name"
            :value="userinfo.name"
            @input="formModel('name', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">性别</text>
          <radio-group class="radio-group" name="sex">
            <label class="set-radio"> <radio value="1" :checked="userinfo.sex == 1 ? true : false" />男 </label>
            <label class="set-radio"> <radio value="2" :checked="userinfo.sex == 2 ? true : false" />女 </label>
          </radio-group>
        </view>
        <view class="set-box2">
          <text class="set-tex1">身高</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入身高，如：168cm"
            name="tall"
            :value="userinfo.tall"
            @input="formModel('tall', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">婚姻</text>
          <radio-group class="radio-group" name="hunyin">
            <label class="set-radio"> <radio value="3" :checked="userinfo.hunyin == 3" />未婚 </label>
            <label class="set-radio"> <radio value="4" :checked="userinfo.hunyin == 4" />已婚 </label>
          </radio-group>
        </view>

        <view class="set-box2">
          <text class="set-tex1">身份证号码</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入您的身份证号"
            name="idcard"
            :value="userinfo.idcard"
            @input="formModel('idcard', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">手机号码</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入您的手机号"
            name="telphone"
            :value="userinfo.telphone"
            @input="formModel('telphone', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">银行卡号</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入银行卡号"
            name="bankcard"
            :value="userinfo.bankcard"
            @input="formModel('bankcard', $event)"
            @blur="bankcard"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">开户银行</text>
          <input
            type="text"
            class="set-inp"
            placeholder="未能获取到开户银行"
            name="bankname"
            :value="userinfo.bankname"
            @input="formModel('bankname', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">开户行地址</text>
          <input
            type="text"
            class="set-inp"
            placeholder="开户行地址"
            name="bank_address"
            :value="userinfo.bank_address"
            @input="formModel('bank_address', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">家庭现在住址</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入家庭现在住址"
            name="address"
            :value="userinfo.address"
            @input="formModel('address', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">政治面貌</text>
          <radio-group class="radio-group" name="dangtuan">
            <label class="set-radio">
              <radio value="214" :checked="userinfo.dangtuan == 214 ? true : false" />中共党员</label
            >
            <label class="set-radio">
              <radio value="213" :checked="userinfo.dangtuan == 213 ? true : false" />团员</label
            >
            <label class="set-radio">
              <radio value="212" :checked="userinfo.dangtuan == 212 ? true : false" />群众</label
            >
          </radio-group>
        </view>

        <view class="set-box2">
          <text class="set-tex1">民族</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入民族：如汉族"
            name="minzu"
            :value="userinfo.minzu"
            @input="formModel('minzu', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">出生年月</text>
          <picker mode="date" :value="date" start="1900-01-01" end="2077-09-01" @change="bindDateChange">
            <view class="picker" v-if="birthday">{{ birthday }}</view>
            <view class="picker" v-else>请选择出生年月</view>
          </picker>
        </view>

        <view class="set-box2">
          <text class="set-tex1">籍贯</text>
          <picker mode="region" @change="bindRegionChange" :value="region">
            <view class="picker" v-if="region[0]">{{ region[0] }} {{ region[1] ? region[1] : '' }} </view>
            <view class="picker" v-else>请选择地区</view>
          </picker>
        </view>

        <view class="set-box2">
          <text class="set-tex1">户口所在地</text>
          <picker mode="region" @change="bindRegionChangehk" :value="region">
            <!--   <view class="picker" v-if="{{regionhk[0]}}">{{regionhk[0]}} {{regionhk[1]?regionhk[1]:''}} {{regionhk[2]?regionhk[2]:''}}</view>-->
            <view class="picker" v-if="regionhk[0]">{{ regionhk[0] }} {{ regionhk[1] ? regionhk[1] : '' }} </view>

            <view class="picker" v-else>请选择地区</view>
          </picker>
        </view>

        <view class="set-box2">
          <text class="set-tex1">学历</text>
          <picker @change="bindPickerChange" :value="index" :range="array">
            <!--   <view class="picker" v-if="{{regionhk[0]}}">{{regionhk[0]}} {{regionhk[1]?regionhk[1]:''}} {{regionhk[2]?regionhk[2]:''}}</view>-->

            <view class="picker" v-if="array[index]">{{ array[index] }} </view>

            <view class="picker" v-else>请选择学历</view>
          </picker>
        </view>

        <view class="set-box2">
          <text class="set-tex1">毕业院校</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入学校名称"
            name="xuexiao"
            :value="userinfo.xuexiao"
            @input="formModel('xuexiao', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">所学专业</text>
          <input
            type="text"
            class="set-inp"
            placeholder="输入学所学专业"
            name="zhuanye"
            :value="userinfo.zhuanye"
            @input="formModel('zhuanye', $event)"
          />
        </view>

        <view class="set-box2">
          <text class="set-tex1">毕业时间</text>
          <picker mode="date" :value="date" start="1900-01-01" end="2077-09-01" @change="bindByjsChange">
            <view class="picker" v-if="bysj">{{ bysj }}</view>
            <view class="picker" v-else>请选择毕业时间</view>
          </picker>
          <!-- <input
            type="text"
            class="set-inp"
            placeholder="输入毕业时间"
            name="bysj"
            :value="userinfo.bysj"
            @input="formModel('bysj', $event)"
          /> -->
        </view>

        <view class="set-box2">
          <text class="set-tex1">是否缴过社保</text>
          <radio-group class="radio-group" name="shebao">
            <label class="set-radio"> <radio value="0" :checked="userinfo.shebao == 0 ? true : false" />否 </label>
            <label class="set-radio"> <radio value="1" :checked="userinfo.shebao == 1 ? true : false" />是 </label>
          </radio-group>
        </view>

        <view class="set-box2">
          <text class="set-tex1">是否缴过公积金</text>
          <radio-group class="radio-group" name="gjj">
            <label class="set-radio"> <radio value="0" :checked="userinfo.gjj == 0 ? true : false" />否 </label>
            <label class="set-radio"> <radio value="1" :checked="userinfo.gjj == 1 ? true : false" />是 </label>
          </radio-group>
        </view>
        <view class="set-box2">
          <text class="set-tex1">上传证件照(一寸)</text>
          <van-uploader
            :file-list="fileList"
            @after-read="afterRead"
            max-count="1"
            :deletable="true"
            @delete="remove"
          />
        </view>
        <van-collapse :value="activeNames" @change="onChange">
          <van-collapse-item title="家庭情况(至少填一条)" name="1">
            <view class="getinfo">
              <view v-for="(item, index) in family" :key="index">
                <van-button icon="newspaper-o" type="primary" size="small" @tap="getbt(item, index, (id = 0))">{{
                  item.f_name
                }}</van-button>
              </view>
            </view>
            <view class="list">
              <van-icon name="add" color="red" size="40px" @click="Zshow" />
            </view>
          </van-collapse-item>
        </van-collapse>
        <van-collapse :value="activeNamesZ" @change="onChangeZ">
          <van-collapse-item title="工作简历" name="1">
            <view class="getinfo">
              <view v-for="(item, index) in jobs" :key="index">
                <van-button icon="newspaper-o" type="primary" size="small" @tap="getbt(item, index, (id = 1))">{{
                  item.j_unit || ''
                }}</van-button>
              </view>
            </view>
            <view class="list">
              <van-icon name="add" color="red" size="40px" @click="Zshow((jobs1 = 1))" />
            </view>
          </van-collapse-item>
        </van-collapse>
      </view>

      <!--已提交过不可编辑-->
      <!-- <button class="set-btn" formType="submit" :disabled="userinfo.status == 3 ? true : false">提交信息</button> -->
      <button class="set-btn" formType="submit" :disabled="disabled">提交信息</button>

      <!--<button class='set-btn' formType="submit">提交信息</button>-->
    </form>

    <van-overlay :show="show" z-index="9999">
      <view class="wrapper">
        <view class="block" catch:tap="noop">
          <view class="icon"> <van-icon name="clear" color="#242424" size="60px" @tap="onClose" /></view>
          <view v-if="!isjob">
            <view class="f_title">家庭情况</view>
            <form @submit="getUserInfo">
              <view class="dia-box1">
                <text class="dia-tex1">姓名</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入姓名"
                  name="f_name"
                  :value="familyInof.f_name"
                  @input="formModel('f_name', $event)"
                />
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">性别</text>
                <radio-group class="radio-group" name="f_sex">
                  <label class="set-radio">
                    <radio value="男" :checked="familyInof.f_sex == '男' ? true : false" />男
                  </label>
                  <label class="set-radio">
                    <radio value="女" :checked="familyInof.f_sex == '女' ? true : false" />女
                  </label>
                </radio-group>
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">关系</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入关系"
                  name="f_relation"
                  :value="familyInof.f_relation"
                  @input="formModel('f_relation', $event)"
                />
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">工作单位</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入工作单位"
                  name="f_unit"
                  :value="familyInof.f_unit"
                  @input="formModel('f_unit', $event)"
                />
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">联系电话</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入联系电话"
                  name="f_tel"
                  :value="familyInof.f_tel"
                  @input="formModel('f_tel', $event)"
                />
              </view>
              <button class="set-btn" formType="submit" v-if="!isSave">提交信息</button>
              <view class="deletei" v-else>
                <button class="set-btn" formType="submit">保存</button>
                <button class="set-btn" type="warn" @tap="deletei">删除</button>
              </view>
            </form>
          </view>
          <view v-else>
            <view class="f_title">工作简历</view>
            <form @submit="getUserInfo">
              <view class="dia-box1">
                <text class="dia-tex1">起止时间</text>
                <input
                  v-if="!Ztime"
                  type="text"
                  placeholder="选择起止时间"
                  name="j_time"
                  :value="jobsInof.j_time"
                  @tap="pickerShow"
                  disabled
                />
                <input v-else name="j_time" class="dia-inp" @tap="pickerShow" :value="Ztime" disabled />
              </view>

              <view class="dia-box1">
                <text class="dia-tex1">单位名称</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入单位名称"
                  name="j_unit"
                  :value="jobsInof.j_unit"
                  @input="formModelZ('j_unit', $event)"
                />
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">职位</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入职位"
                  name="j_post"
                  :value="jobsInof.j_post"
                  @input="formModel('j_post', $event)"
                />
              </view>
              <view class="dia-box1">
                <text class="dia-tex1">证明人</text>
                <input
                  type="text"
                  class="dia-inp"
                  placeholder="输入证明人"
                  name="j_certifier"
                  :value="jobsInof.j_certifier"
                  @input="formModel('j_certifier', $event)"
                />
              </view>
              <button class="set-btn" formType="submit" v-if="!isSave">提交信息</button>
              <view class="deletei" v-else>
                <button class="set-btn" formType="submit">保存</button>
                <button class="set-btn" type="warn" @tap="deletei">删除</button>
              </view>
            </form>
          </view>
        </view>
      </view>
    </van-overlay>
    <!-- 时间起止 -->
    <timePicker
      :pickerShow="isPickerShow"
      id="picker"
      v-if="isPickerRender"
      @hidePicker="pickerHide"
      @setPickerTime="setPickerTime"
      :config="pickerConfig"
    ></timePicker>
    <view class="index-swiper">
      <ad unit-id="adunit-b162728fa0cbed65"></ad>
    </view>
  </view>
</template>


<script>
import Taro from '@tarojs/taro';
import { bankcard, getkefu, jobadd } from '@api/set';
import { Current } from '@tarojs/taro';
import Notify from '@components/vant/notify/notify';
// import { delete } from 'node_modules/vue/types/umd';
export default {
  data() {
    return {
      fileList: [],
      isSave: false,
      family: [],
      jobs: [],
      familyInof: '',
      jobsInof: '',
      show: false,
      activeNames: ['1'],
      activeNamesZ: ['1'],
      xydw: '',
      kefu: '',
      kftel: '',
      loading: false,
      userinfo: [],
      region: [],
      regionhk: '',
      uppic: '',
      pic: '',
      index: 0,
      birthday: '',
      date: '',
      bysj: '',
      idphoto: '',
      disabled: false,
      yuangong_id: '',
      array: ['小学', '硕士', '博士', '大专', '中专', '高中', '初中', '本科', '其他学历'],
      objectArray: [
        {
          id: 0,
          name: '美国',
        },
        {
          id: 1,
          name: '中国',
        },
        {
          id: 2,
          name: '巴西',
        },
        {
          id: 3,
          name: '日本',
        },
      ],
      isjob: '',
      gsid: 0,
      f_index: '',
      Ztime: '',
      // 时间起止变量
      isPickerRender: false,
      isPickerShow: false,
      startTime: '2019-01-01 12:32:44',
      endTime: '2019-12-01 12:32:44',
      pickerConfig: {
        endDate: true,
        column: 'day',
        dateLimit: true,
        initStartTime: '2019-01-01 12:32:44',
        initEndTime: '2019-12-01 12:32:44',
        limitStartTime: '1920-05-06 12:32:44',
        limitEndTime: '2055-05-06 12:32:44',
      },
    };
  },

  onShow() {
    var that = this;
    //获取本地sessinid
    var session_id = Taro.getStorageSync('session_id');

    //获取扫码进入id
    var gsid = Taro.getStorageSync('gsid');

    this.gsid = Taro.getStorageSync('gsid');

    if (session_id.length < 1) {
      Taro.showModal({
        title: '提示',
        content: '需要授权登录后操作',
        success(res) {
          if (res.confirm) {
            const { id, jtid } = Current.router.params;
            Taro.navigateTo({
              url: `/pages/login/index?sq=1&id=${id}&jtid=${jtid}`,
            });

            console.log('用户点击确定');
          } else if (res.cancel) {
            console.log('用户点击取消');
            that.disabled = true;
            Taro.showToast({
              icon: 'none',
              title: '未授权,无法使用此项功能',
              duration: 2000,
            });
          }
        },
      });
    }
  },
  created() {
    const { id, jtid } = Current.router.params;
    console.log(id, jtid, '阐述');
    // xydw = 单位名称;
    // kefu = 客服名字;
    // kftel = 客服电话;
    getkefu({ id, jtid }).then((res) => {
      // console.log(res.data, '这是客服信息');
      if (res.code == 0) {
        const { xydw, kefu, kftel } = res.data[0];
        this.xydw = xydw;
        this.kefu = kefu;
        this.kftel = kftel;
      }
    });
    const that = this;
    //app.loadding();
    that.$getuserinfo(function (data) {
      console.log(data, '.................表单数据....................');
      that.userinfo = data.data;
      that.family = data.data.family || [];
      that.family = data.data.family || [];
      that.jobs = data.data.jobs || [];
      that.idphoto = data.data.idphoto;
      that.yuangong_id = data.data.yuangong_id || '';
      that.fileList = data.data.idphoto ? [{ url: data.data.idphoto }] : [];
      that.region = [data.data.province, data.data.city, data.data.area];
      that.regionhk = [data.data.hkprovince, data.data.hkcity, data.data.hkarea];
      that.birthday = data.data.birthday;
      that.bysj = data.data.bysj;
      that.index = data.data.xueli;
    }, id);
  },
  methods: {
    bankcard(e) {
      Taro.showLoading({
        title: '获取开户银行',
      });
      bankcard({ kahao: e.detail.value })
        .then((res) => {
          if (!res.code) {
            this.userinfo.bankname = res.data;
            return;
          }
          //  Notify('通知内容');
        })
        .catch((res) => {
          this.userinfo.bankname = '';
        });
    },
    // 删除图片
    remove(e) {
      console.log(e);
      this.fileList = [];
    },
    // 上传图片
    afterRead(event) {
      const { file } = event.detail;
      const that = this;
      // console.log(file, '上传图片');
      // 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式

      Taro.uploadFile({
        url: 'https://xxyg.daxinxin.vip/api.php/home/test/uppic', // 仅为示例，非真实的接口地址
        filePath: file.url,
        name: 'file',
        formData: { user: 'test' },
        success(res) {
          const img = JSON.parse(res.data);
          console.log(img, '上传ok');
          that.idphoto = img.data;
          console.log(that.idphoto, 'idphoto');
          let arr = [];
          arr.push({ url: img.data, name: 'head', deletable: true });
          console.log(arr, 'arr');
          that.fileList = arr;
          console.log(that.fileList, 'that.fileList');
        },
      });
    },
    // 提交信息/保存
    getUserInfo(e) {
      this.Ztime = '';
      if (this.isjob) {
        if (this.isSave) {
          this.jobs[this.f_index] = e.detail.value;
          this.show = false;

          return;
        } else {
          this.show = false;
          this.jobs.push(e.detail.value);
          console.log(this.jobs, '工作信息');
        }
      } else {
        if (this.isSave) {
          this.family[this.f_index] = e.detail.value;
          this.show = false;

          return;
        } else {
          this.show = false;
          this.family.push(e.detail.value);
          console.log(this.family, '家庭信息');
        }
      }
    },
    //删除
    deletei() {
      this.Ztime = '';
      if (this.isjob) {
        const jobs = this.jobs;
        jobs.splice(this.f_index, 1);
        this.jobs = jobs;
        this.show = false;
      } else {
        const family = this.family;
        family.splice(this.f_index, 1);
        this.family = family;
        this.show = false;
      }
    },
    // 查看
    getbt(item, index, id) {
      if (id) {
        console.log(item, '我进来工作');
        this.jobsInof = item;
        this.isjob = true;
      } else {
        console.log(item, '我进来家庭');
        this.familyInof = item;
        this.isjob = false;
      }
      this.show = true;
      this.isSave = true;
      this.f_index = index;
    },
    //  添加
    Zshow(jobs) {
      this.show = true;
      this.isSave = false;
      this.isjob = false;
      this.familyInof = {};
      if (jobs == 1) {
        this.isjob = true;
        this.jobsInof = {};
      }
    },
    onClose() {
      this.show = false;
    },
    onChange(event) {
      this.activeNames = event.detail;
    },
    onChangeZ(event) {
      this.activeNamesZ = event.detail;
    },

    formModel(name, e) {
      // console.log(name, e);
      this.userinfo[name] = e.detail.value;
    },
    formModelZ(name, e) {
      // console.log(name, e);
      this.jobsInof[name] = e.detail.value;
    },
    formSubmit: function (e) {
      const { id, jtid } = Current.router.params;
      var formdata = e.detail.value;
      formdata.yuangong_id = this.yuangong_id;
      formdata.jobs = this.jobs;
      formdata.family = this.family;
      formdata.idphoto = this.idphoto;
      formdata.bysj = this.bysj;
      formdata.birthday = this.birthday;
      formdata.province = this.region[0];
      formdata.city = this.region[1];
      formdata.area = this.region[2];
      formdata.hkprovince = this.regionhk[0];
      formdata.hkcity = this.regionhk[1];
      formdata.hkarea = this.regionhk[2];
      formdata.xueli = this.index;
      formdata.gsid = id;
      formdata.jtid = jtid;
      console.log(formdata, '提交成功');
      // this.loading = true;
      jobadd({ formdata: formdata }).then((res) => {
        if (!res.code) {
          this.loading = false;
          Taro.showToast({
            icon: 'none',
            title: '提交成功',
            duration: 2000,
          });
          setTimeout(() => {
            Taro.navigateTo({
              url: '/pages/index/index',
            });
            // Taro.navigateBack({
            //   delta: 2,
            // });
          }, 2000);
        }
      });
    },
    bindPickerChange(e) {
      console.log('picker发送选择改变，携带值为', e.detail.value);

      this.index = e.detail.value;
    },

    bindRegionChange(e) {
      this.region = e.detail.value;
    },

    bindRegionChangejg(e) {
      this.regionjg = e.detail.value;
    },

    bindRegionChangehk(e) {
      this.regionhk = e.detail.value;
    },
    bindDateChange(e) {
      this.birthday = e.detail.value;
    },
    bindByjsChange(e) {
      this.bysj = e.detail.value;
    },
    pickerShow: function () {
      this.isPickerShow = true;
      this.isPickerRender = true;
      this.chartHide = true;
    },
    pickerHide: function () {
      this.isPickerShow = false;
      this.chartHide = false;
    },

    setPickerTime: function (val) {
      console.log('我确定了');
      console.log(val.detail.startTime.split(' ')[0], val.detail.endTime);
      let Ztime = val.detail.startTime.split(' ')[0] + '/' + val.detail.endTime.split(' ')[0];
      this.Ztime = Ztime;
    },
  },

  onShareAppMessage(res) {
    const { id, jtid } = Current.router.params;
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target);
    }
    return {
      title: '薪薪员工(入职办理)',
      path: `/pages/entry/index?id=${id}$jtid=${jtid}`,
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      },
    };
  },
  onShareTimeline() {},
};
</script>

<style lang='less'>
/* pages/my/set.wxss */
page {
  background: #f4f4f4;
  font-family: Microsoft Yahei;
  font-size: 30px;
  position: relative;
}
.message {
  padding: 0 20px;
}
.getinfo {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  /* justify-content: space-around;  */
  flex-wrap: wrap;
  .van-button {
    margin: 20px;
  }
}
.f_title {
  width: 100%;
  height: 80px;
  text-align: center;
  font-size: 40px;
  line-height: 80px;
  border-bottom: #ededed solid 1px;
  font-weight: bold;
}
.icon {
  height: 50px;
  position: absolute;
  // border-radius: 70px;
  // background-color: red;
  top: -35px;
  right: -35px;
}
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.block {
  position: relative;
  width: 650px;
  border-radius: 10px;
  background-color: #fff;
}
.dia-box1 {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: #ededed solid 1px;
}
.dia-tex1 {
  width: 35%;
}
.dia-inp {
  flex: 1;
}
.list {
  width: 100%;
  text-align: center;
}

.set {
  position: relative;
}
.title {
  width: 100%;
  height: 100px;
  text-align: center;
  line-height: 100px;
  font-size: 40px;
  font-weight: bold;
  border-bottom: #ededed solid 1px;
}
.set {
  position: relative;
}
.loading {
  position: fixed !important;
  top: calc(50%);
  left: calc(50%);
  transform: translate(-50%, -50%);
}
/*暂无*/
.zan-box {
  width: 100%;
  text-align: center;
  margin-top: 40%;
  float: left;
}
.zan-img {
  width: 50px;
  height: 50px;
  display: inline-block;
}
.zan-text {
  display: block;
  text-align: center;
  color: #b8b8b8;
  font-size: 14px;
  width: 100%;
  margin-top: 10px;
}
.set-box {
  width: 100%;
  float: left;
  background: #fff;
  padding: 0 20px;
  box-sizing: border-box;
  margin-bottom: 30px;
}
.set-box2 {
  width: 100vw;
  // float: left;
  display: flex;
  border-bottom: 1px #ededed solid;
  padding: 35px 0px;
}

.picker {
  height: 30px;
  line-height: 30px;
}
.set-tex1 {
  display: block;
  // height: 30px;
  // line-height: 50px;
  color: #333;
  float: left;
  margin-right: 15rpx;
  width: 250px;
  text-align: left;
}
.set-inp {
  height: 30px;
  line-height: 30px;
  overflow: hidden;
  margin-left: 10px;
  float: left;
  color: #000;
  width: 360rpx;
}
.set-add {
  width: 40px;
  height: 40px;
  margin-left: 10px;
  display: block;
  float: left;
}
.set-textarea {
  border: 1px #ededed solid;
  border-radius: 5px;
  float: left;
  width: 100%;
  box-sizing: border-box;
  height: 80px;
  padding: 20px;
  margin: 8px 0;
  color: #666;
}
.set-btn {
  width: 90%;
  margin: 0 5%;
  height: 60px;
  line-height: 60px;
  background: #056ba7;
  color: #fff;
  font-size: 40px;
  margin-top: 30px;
  /* float: left; */
  margin-bottom: 100px;
}
.set-radio {
  height: 30px;
  line-height: 30px;
  color: #666;
}
.set-radio radio {
  transform: scale(0.8);
}
.deletei {
  .set-btn {
    margin-bottom: 20px;
  }
  .set-btn:last-child {
    margin-bottom: 80px;
  }
}
.van-cell {
  padding: 15px 1px !important;
  font-size: 15px !important ;
}
</style>